# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>

pkgname=cuyo
pkgver=2.1.0
pkgrel=5
epoch=1
pkgdesc="Tetris-style puzzle game for up to two players with a twist"
arch=('loong64' 'x86_64')
url="https://www.karimmi.de/cuyo/"
license=('GPL')
depends=('desktop-file-utils' 'hicolor-icon-theme' 'sdl' 'sdl_mixer' 'sdl_image' 'xdg-utils')
makedepends=('patch')
changelog=$pkgname.changelog
source=(https://download.savannah.gnu.org/releases/$pkgname/$pkgname-$pkgver.tar.gz
        $pkgname.diff)
sha256sums=('6c0809a59a2d236f15d8fbd68d61fb1465e51f6c327d7f7ae4db9f4e44dad89f'
            'efceed1489c551f5ae8909df3ad57f302f8105cbb1e735d8ece44269e886ce7c')

prepare() {
  cd "${srcdir}"/$pkgname-$pkgver
  patch -Np0 -i "${srcdir}"/$pkgname.diff
}

build() {
  cd "${srcdir}"/$pkgname-$pkgver

  ./configure --prefix=/usr
  make
}

package() {
  cd "${srcdir}"/$pkgname-$pkgver

  make DESTDIR="${pkgdir}" install
}
